<?php

Class blogController Extends baseController {

public function index() 
{
        $contentDAO = CreateObject("Model_DAO_Content");
        $contents = $contentDAO->lists();
        //var_dump($accounts);
        $this->registry->template->contents = $contents;
        $this->registry->template->show('blog_index');
}


public function view(){

    if(isset($_REQUEST["id"]))
    {
        $id = $_REQUEST["id"]; 
        $contentDAO = CreateObject("Model_DAO_Content");
        $content = $contentDAO->get($id);
        
        $this->registry->template->content = $content;
	    $this->registry->template->show('blog_view');
    }
    header("Location: index.php?rt=blog/index");
}

}
?>
